home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
wtek0693.zip
/
OOPALLEY.ZIP
/
INTEGER.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-27
|
1KB
|
33 lines
#ifndef INTEGER_H
#define INTEGER_H
#include "object.h"
extern const Class class_Integer;
////////////////////////////////////////////////////////////
// class Integer (declaration)
////////////////////////////////////////////////////////////
class Integer: public Object {
int val;
// private member function
void parseInteger(istream& strm) { strm >> val; }
public:
// constructors, destructors
Integer(int v =0) { val = v; }
Integer(istream&);
int value() const { return val; }
int value(int newval) { return val = newval; }
virtual int compare(const Object&) const;
virtual Object* copy() const;
virtual void deepenShallowCopy();
virtual unsigned hash() const;
virtual const Class* isA() const;
virtual bool isEqual(const Object&) const;
virtual void printOn(ostream& strm) const;
virtual const Class* species() const;
};
#endif